package com.xiaoKe.zhonghzu.global.okhttp;

import com.xiaoKe.zhonghzu.global.bean.ClFzData;
import com.xiaoKe.zhonghzu.global.bean.FzDataDetailsBean;
import com.xiaoKe.zhonghzu.global.bean.FzDataListBean;
import com.xiaoKe.zhonghzu.global.bean.FzDataObject;
import com.xiaoKe.zhonghzu.global.bean.LoginResBody;
import com.xiaoKe.zhonghzu.global.bean.ProgressBean;

import java.util.List;
import java.util.Map;

import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.DELETE;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.PUT;
import retrofit2.http.Path;
import retrofit2.http.Query;
import retrofit2.http.Streaming;
import retrofit2.http.Tag;

/**
 * @ProjectName : xiaoke-pad-zhongzhu
 * @Author : Shijingna
 * @Time : 2024/7/12 15:24  download
 * @Description : 接口/请求方式
 */

public interface ApiService {

    //登录
    @POST("login")
    Call<LoginResBody> getSysLogin(@Tag String tag, @Body Map alarmBean);

    //繁殖性状-列表
    @GET("pmFzRecord/list")
    Call<FzDataListBean> getFzDataList(@Tag String tag,  @Query("searchDateRange") String searchDateRange);

    //繁殖性状-新增
    @POST("pmFzRecord")
    Call<FzDataObject> postFzData(@Tag String tag, @Body List<ClFzData> map);

    //繁殖性状-修改
    @PUT("pmFzRecord")
    Call<FzDataObject> putFzData(@Tag String tag, @Body ClFzData map);

    //繁殖性状-详情
    @GET("pmFzRecord/{id}")
    Call<FzDataDetailsBean> getFzData(@Tag String tag, @Path("id") Long id);

    //繁殖性状-删除
    @DELETE("pmFzRecord/{id}")
    Call<FzDataDetailsBean> deleteFzData(@Tag String tag, @Path("id") Long id);

    @Streaming // 防止内存溢出，用于下载大文件
    @GET("pmFzRecord/export")
    Call<ResponseBody> export();

}
